<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>RVM : Cross-Platform Building</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            RVM : Cross-Platform Building
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on Jun 21, 2007 by <font color="#0050B2">pdonald</font>.
				    </div>

				    <p>The Jikes<a href="http://docs.codehaus.org/display/RVM/Trademarks" title="Trademarks">™</a> RVM build process consists of two major phases: the building of a <em>boot image</em>, and the building of a <em>boot loader</em>. The boot image is built using a Java™ program executed within a host JVM and is therefore platform-neutral. By contrast, the boot loader is written in C, and must be compiled on the target platform.</p>

<p>Because building the boot image can be time-consuming, you may prefer to build the boot image on a faster machine than the target platform. You may also be porting Jikes RVM to a target platform that lacks tools such or whose development environment is otherwise unpleasant. To cross-build, simply set your <tt>host.name</tt> and <tt>target.name</tt> properties to different values.</p>

<p>For example, to build the <tt>prototype</tt> configuration for AIX<a href="http://docs.codehaus.org/display/RVM/Trademarks" title="Trademarks">™</a> on a Linux host:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>% cd $RVM_ROOT
% ant -Dconfig.name=prototype -Dhost.name=ia32-linux -Dtarget.name=ppc32-aix cross-compile-host
</pre>
</div></div>
<p>The build process is then completed by building just the boot loader on an AIX host:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>% cd $RVM_ROOT
% ant -Dconfig.name=prototype -Dhost.name=ppc32-aix cross-compile-target
</pre>
</div></div>
<p>After the script has completed successfully, you should be able to run Jikes RVM.</p>

<p>The building of the boot loader must occur in the same directory as the rest of the build. This can either be done transparently via a network file system, or by copying the build directory from the first host to the target. </p>


<h2><a name="Cross-PlatformBuilding-Dependencies"></a>Dependencies</h2>

<p>To compile the boot image on the host system you will also need to have built any dependencies on the target machine and then copied them to the host machine. You will also need to add an appropriate line into your <em>${components.dir}components.properties</em> file such as the following (if the target system was pppc32-linux).</p>

<p>  ppc32-linux.classpath.lib.dir=path/to/components/classpath/95/ppc32-linux/lib</p>

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Note</b><br />It may be possible to simply build the dependencies on the host machine, modify the <em>${components.dir}/components.properties</em> so that the dependency property for target machine maps to the same value as the dependency property on the host machine. This works at the current time but may fail in the future if classpath changes the API between platforms. i.e.

<p>  ppc32-linux.classpath.lib.dir=path/to/components/classpath/95/ia32-linux/lib</p></td></tr></table></div>

				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="http://docs.codehaus.org/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Jul 04, 2010 19:57</font></td>
		    </tr>
	    </table>
    </body>
</html>